package main

import "fmt"

func main() {
    s1 := "abcdefghijklmnopqrstuvwxyz"
    fmt.Println(&s1)

    s2 := "abcdefghijklmnopqrstuvwxyz"
    fmt.Println(&s2)

    s3 := s1    //s3 is a new copy of s1, not s1 itself
    fmt.Println(&s3)

    n1 := 1.0
    fmt.Println(&n1)

    n2 := 1.0
    fmt.Println(&n2)

    var s4 string
    fmt.Println(&s4)
    s4 = s1     //s4 is a new copy of s1, not s1 itself
    fmt.Println(&s4)

    //in go string assignment is value copy, NOT reference copy
    //the output shows ps1, ps2, ps3, ps4 have differentaddresses
    //according to the changes of their addresses, string variables value are NOT the start address of a char arrays as in C++. guess string variable in Go is some kind of struct(let's say string struct here) which has 10 bytes length, maybe it has an internal pointer which points to the real underhood char array, and string variable assignment are the duplication of string struct, maybe the underhood char array are not duplicated.
}
